﻿<h1>{{college.Name}}</h1>
{{college.Address}}<br />
{{college.Phone}}<br />
<img ng-src="{{college.Image}}" style="height:200px; width:200px"/><br />
{{college.Description}}<br />
Acceptance Rate: {{college.AcceptanceRate}}%<br />
Enrollment: {{college.Enrollment | number}}<br />
Tuition: {{college.Tuition | currency}}<br />
Average Rating:{{college.AverageRating}}<br />
Link To College Site:{{college.URL}}<br />

<button class="btn btn-danger btn-sm  pull-right" ng-click="DeleteCollege()">Delete College</button> 
 <button class="btn btn-warning btn-sm pull-right" ng-click="EditCollege()">Edit College</button>

<table class="table table-hover table-bordered">
    <tr>
        <th>Name</th>
        <th>Review</th>
        <th>Rating<button class="btn btn-primary btn-sm pull-right" ng-click="AddReview()">Add Review</button></th>
    </tr>
    <tr ng-repeat="review in reviews">
        <td>{{review.Name}}</td>
        <td>{{review.Comment}}</td>
        <td ng-if="review.Rating==0">&#9734&#9734&#9734&#9734&#9734
            <button class="btn btn-sm btn-danger pull-right" ng-click="DeleteReview(review.Id)">X</button>
        </td>
        <td ng-if="review.Rating==1">&#9733&#9734&#9734&#9734&#9734<button class="btn btn-sm btn-danger pull-right" ng-click="DeleteReview(review.Id)">X</button></td>
        <td ng-if="review.Rating==2">&#9733&#9733&#9734&#9734&#9734<button class="btn btn-sm btn-danger pull-right" ng-click="DeleteReview(review.Id)">X</button></td>
        <td ng-if="review.Rating==3">&#9733&#9733&#9733&#9734&#9734<button class="btn btn-sm btn-danger pull-right" ng-click="DeleteReview(review.Id)">X</button></td>
        <td ng-if="review.Rating==4">&#9733&#9733&#9733&#9733&#9734<button class="btn btn-sm btn-danger pull-right" ng-click="DeleteReview(review.Id)">X</button></td>
        <td ng-if="review.Rating==5">&#9733&#9733&#9733&#9733&#9733<button class="btn btn-sm btn-danger pull-right" ng-click="DeleteReview(review.Id)">X</button></td>
    </tr>
</table>